<!DOCTYPE html>
<html>
<head>
    <title>物流列表</title>
    <#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn" style="font-size: 12px">
            <form class="form-inline" role="form">
                <a class="btn btn-default btn-sm" @click="reset"><i class="fa fa-refresh"></i></a>
                <div class="form-group">
                    <input type="text" class="form-control input-sm" v-model="q.orderNo" @keyup.enter="query" placeholder="订单号">
                </div>&nbsp;&nbsp;&nbsp;
                <div class="form-group">
                    <input type="text" class="form-control input-sm" v-model="q.logisticsName" @keyup.enter="query" placeholder="物流名称">
                </div>&nbsp;&nbsp;&nbsp;
                <div class="form-group">
                    <input type="text" class="form-control input-sm" v-model="q.logiNo" @keyup.enter="query" placeholder="物流单号">
                </div>&nbsp;&nbsp;&nbsp;
                <div class="form-group">
                    <input type="number" class="form-control input-sm" v-model="q.beginLogiCost" style="width: 120px;" @keyup.enter="query" placeholder="物流金额"/>
                    至
                    <input type="number" class="form-control input-sm" v-model="q.endLogiCost" style="width: 120px;"@keyup.enter="query" placeholder="物流金额"/>
                </div>&nbsp;&nbsp;&nbsp;
                <div class="form-group">
                    <input class="form-control input-sm" v-model="q.beginCreatetime" style="width: 120px;" @keyup.enter="query" @click = "checkBeginDate" placeholder="开始时间"/>
                    至
                    <input class="form-control input-sm" v-model="q.endCreatetime" style="width: 120px;"@keyup.enter="query" @click = "checkEndDate" placeholder="结束时间"/>
                </div>&nbsp;&nbsp;&nbsp;
                <div class="form-group">
                    <el-select v-model="q.logisticFinanceStatus" filterable placeholder="审核状态" size="mini">
                        <el-option  v-for="item in e.logisticFinanceStatusList"
                                    :key="item.id"  :label="item.describe" :value="item.id">  </el-option>
                    </el-select>
                </div>&nbsp;&nbsp;&nbsp;
                <a class="btn btn-default btn-sm"  @click="query"><i class="fa fa-search"></i>&nbsp;查询</a>
            </form>
        </div>
        <span style="margin-left: 30px;color: red ">
            物流总额：{{totalAmount}}元
        </span>&nbsp;&nbsp;&nbsp;
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <!-- 录入成本弹框 -->
    <el-dialog title="物流成本" :visible.sync="costFormVisible" width="420px">
        <el-form :model="costForm">
            <el-form-item label="成本" label-width="80px">
                <el-input-number v-model="costForm.logiCost" :precision="2" :step="1" :min="0" :max="100000"></el-input-number>
            </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button type="primary" @click="enteringCost" size="mini">确 定</el-button>
            <el-button @click="costFormVisible = false" size="mini">取 消</el-button>
        </div>
    </el-dialog>

    <!-- 修改运单号 -->
    <el-dialog title="物流信息" :visible.sync="logiInfoVisible" width= "30%" append-to-body>
        <el-form size="medium">
            <el-form-item label="物流名称：" label-width="120px">
                <el-select v-model="logiInfo.logiCompany"  filterable
                           placeholder="请选择" size="mini">
                    <el-option v-for="item in logisticsTypeList" :key="item.logisticsId"
                               :label="item.logisticsName" :value="item.logisticsName"/>
                </el-select>
            </el-form-item>
            <el-form-item label="物流单号：" label-width="120px">
                <el-input v-model="logiInfo.logiNo"></el-input>
            </el-form-item>
            <el-form-item label="物流金额：" label-width="120px">
                <el-input v-model="logiInfo.logiCost"></el-input>
            </el-form-item>
            <el-form-item label="物流备注：" label-width="120px">
                <el-input v-model="logiInfo.logiRemark"></el-input>
            </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button size="small" @click="logiInfoVisible = false">取 消</el-button>
            <el-button size="small" @click="updateLogisticsInfo" type="primary">确 定</el-button>
        </div>
    </el-dialog>

</div>

<script src="${request.contextPath}/statics/js/modules/logistics/erpLogistics.js?_${.now?long}"></script>
</body>
</html>